package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * 首页轮播图实体类
 */

@Data
@TableName("index_img")
public class IndexImg {
    @TableId("img_id")
    private Integer id;
    @TableField("img_url")
    private String url;
    @TableField("category_id")
    private Integer categoryId;          //轮播图的种类
    @TableField("index_type")
    private Integer indexType;          //轮播图类型 轮播图类型，用于判断，可以根据商品id或者分类进行页面跳转，1：商品 2：分类
    private Integer status;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("update_time")
    private Date updateTime;

    @TableField(exist = false)
//    private Category category;
    private Category categories;
}

